Skip to content

Conversation

@FionaBronwen
Copy link
Contributor

@FionaBronwen FionaBronwen commented Jan 12, 2026

Summary

Added overloads to isArrayModelType and isRecordModelType that don't require the unused program parameter. The old signature is deprecated but still works for backward compatibility.

Usage

// New (preferred)
isArrayModelType(type)
isRecordModelType(type)

// Old (deprecated, still works)
isArrayModelType(program, type)
isRecordModelType(program, type)

@microsoft-github-policy-service microsoft-github-policy-service bot added compiler:core Issues for @typespec/compiler lib:http tspd Issues for the tspd tool emitter:client:java Issue for the Java client emitter: @typespec/http-client-java emitter:openapi3 Issues for @typespec/openapi3 emitter labels Jan 12, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 12, 2026

Open in StackBlitz

@typespec/compiler

npm i https://pkg.pr.new/microsoft/typespec/@typespec/compiler@9336

@typespec/http

npm i https://pkg.pr.new/microsoft/typespec/@typespec/http@9336

@typespec/http-server-csharp

npm i https://pkg.pr.new/microsoft/typespec/@typespec/http-server-csharp@9336

@typespec/http-server-js

npm i https://pkg.pr.new/microsoft/typespec/@typespec/http-server-js@9336

@typespec/openapi

npm i https://pkg.pr.new/microsoft/typespec/@typespec/openapi@9336

@typespec/openapi3

npm i https://pkg.pr.new/microsoft/typespec/@typespec/openapi3@9336

@typespec/tspd

npm i https://pkg.pr.new/microsoft/typespec/@typespec/tspd@9336

commit: fc8a1a6

@github-actions
Copy link
Contributor

github-actions bot commented Jan 12, 2026

All changed packages have been documented.

  • @typespec/compiler
  • @typespec/http-server-csharp
  • @typespec/http-server-js
  • @typespec/http
  • @typespec/openapi3
  • @typespec/tspd
Show changes

@typespec/compiler - deprecation ✏️

Deprecate program parameter in isArrayModelType and isRecordModelType functions. Use the new single-argument overload instead: isArrayModelType(type) and isRecordModelType(type).

@typespec/http - deprecation ✏️

Deprecate program parameter in isArrayModelType and isRecordModelType functions. Use the new single-argument overload instead: isArrayModelType(type) and isRecordModelType(type).

@typespec/openapi3 - deprecation ✏️

Deprecate program parameter in isArrayModelType and isRecordModelType functions. Use the new single-argument overload instead: isArrayModelType(type) and isRecordModelType(type).

@typespec/tspd - deprecation ✏️

Deprecate program parameter in isArrayModelType and isRecordModelType functions. Use the new single-argument overload instead: isArrayModelType(type) and isRecordModelType(type).

@typespec/http-server-js - deprecation ✏️

Deprecate program parameter in isArrayModelType and isRecordModelType functions. Use the new single-argument overload instead: isArrayModelType(type) and isRecordModelType(type).

@typespec/http-server-csharp - deprecation ✏️

Deprecate program parameter in isArrayModelType and isRecordModelType functions. Use the new single-argument overload instead: isArrayModelType(type) and isRecordModelType(type).

@FionaBronwen FionaBronwen force-pushed the fionabronwen/type-utils branch 2 times, most recently from e2c2b45 to d708f88 Compare January 13, 2026 16:00
@FionaBronwen FionaBronwen marked this pull request as ready for review January 16, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler:core Issues for @typespec/compiler emitter:client:java Issue for the Java client emitter: @typespec/http-client-java emitter:openapi3 Issues for @typespec/openapi3 emitter lib:http tspd Issues for the tspd tool

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant